##!/bin/bash


#uninstall useless package

yum -y remove httpd php mysql-server mysql php-mysql

#yum -y install yum-fastestmirror
yum -y update

#install base
for packages in patch make cmake gcc gcc-c++ gcc-g77 flex bison file libxml2 libxml2-devel libtool libtool-libs autoconf kernel-devel libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel vim-minimal nano fonts-chinese gettext gettext-devel ncurses-devel gmp-devel pspell-devel unzip;do yum -y install $packages; done

installsh='pcre-8.01.sh nginx-1.6.1.sh  mysql-5.5.39.sh libmcrypt-2.5.8.sh  mcrypt-2.6.8.sh  mhash-0.9.9.9.sh libiconv-1.13.sh php-5.3.29.sh proftpd-1.3.3d.sh'

for i in $installsh;do
	bash $i
done


